package cn.itcast.bos.dao.base;

import java.io.Serializable; 
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import cn.itcast.bos.domain.PageBean;


public interface IbaseDao<T> {

	//增加
	public void save(T t);
	
	//删除
	public void delete(T t);
	
	//修改
	public void update(T t);
	
	//查询单个
	public T findOne(Serializable id);
	
	//查询所有
	public List<T> findAll();
	
	//离线对象查询
	public List<T> findByCriteria(DetachedCriteria criteria );
	
	//根据命名语句查询
	public List<T> findByNamedQuery(String queryName,Object...args);
	/**
	 * 执行增删改操作的命名语句
	 */
	public void executeNamedQuery(String queryName,Object ...args);
	
	public void pageQuery(PageBean pageBean);
}
